{if $banner}
  {var $positionKey = $banner->getBannerposition()->getName()}
  <div class="row ener {if $positionKey == 'homepage_banner'}home{elseif $positionKey == 'video_detail_banner'}video{elseif $positionKey == 'comment_banner'}comment{/if}">  
    <a href="{$banner->getLink()}" title="{$banner->getTitle()}" target="_blank" rel="nofollow" {$banner->getStyle()}>
      {if $banner->getImage()}
        <img src="{$basePath}/content/banners/{$banner->getImage()}" alt="{$banner->getTitle()}">
      {elseif $banner->getText()}
        <span class="text">
          {$banner->getText()}
        </span>
      {/if}
    </a>
  </div>
{/if}